using System;

namespace Chaotic.DataBase.DataAccess
{
	[Serializable]
	public class ParamField
	{
		private readonly string? _mParamName;

		private readonly string _mFieldName;

		public string? ParamName => _mParamName;

		public string FieldName => _mFieldName;

		public ParamField(string strParamName, string strFieldName)
		{
			if (PersistenceProperty.DatabaseType == DatabaseType.MSSQLServer || PersistenceProperty.DatabaseType == DatabaseType.DB2)
			{
				_mParamName = strParamName.Replace(":", "@");
				_mFieldName = strFieldName;
			}
			else
			{
				_mParamName = strParamName.Replace("@", ":");
				_mFieldName = strFieldName;
			}
		}
	}
}